package com.zy.io;

import java.io.Serializable;
import java.util.List;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/12/12 14:43
 **/
public class User implements Serializable {
    private int id;
    private String name;
    private List<User> userList;
    
    /**
     * @Author GongXL
     * @Description  输出用户信息
     * @Date 14:48 2021/12/12
     * @Param []
     * @return void
     **/
    public void print() {
        System.out.println( "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", userList=" + userList +
                '}');
    }

    public User(int id, String name) {
        this.id = id;
        this.name = name;
    }
    public User(int id, String name,List<User> userList) {
        this.id = id;
        this.name = name;
        this.userList = userList;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<User> getUserList() {
        return userList;
    }

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }
}
